#define _CRT_SECURE_NO_WARNINGS 1
using namespace std;

typedef struct TreeNode
{
	int val;
	struct TreeNode* left;
	struct TreeNode* right;
}TreeNode;

class Solution {
public:
	int sumOfLeftLeaves(TreeNode* root)
	{
		if (root == nullptr)
			return 0;
		if (root->left == nullptr&&root->right == nullptr)
			return 0;
		int left = sumOfLeftLeaves(root->left);
		if (root->left != nullptr&&root->left->left == nullptr&&root->left->right == nullptr)
			left += root->left->val;

		int right = sumOfLeftLeaves(root->right);

		return left + right;
	}
};


int main()
{
	return 0;
}